!'use strict';
var multipartMiddleware = require('connect-multiparty')();
let RentalController = require('../../../app/controller/back/rent/RentalController');
RentalController = ModelProxy(RentalController);
let router = require('express').Router();

router.get('/page',RentalController.rentalPage);
router.post('/list',RentalController.list);

// 托盘租赁订单-详情页面
router.get('/detailRental/page',RentalController.detailRentalPage);

// 托盘租赁绑定订单订单-详情页面
router.get('/detailRental/bind/page',RentalController.bindRentalPage);
// 托盘租赁绑定订单订单-列表
router.post('/detailRental/bind/list',RentalController.bindRentalList);
// 托盘租赁可绑定订单订单-列表
router.post('/detailRental/bind/Canlist',RentalController.bindRentalCanlist);
// 托盘租赁解除绑定订单订单-列表
router.post('/detailRental/bind/SubmitList',RentalController.SubmitList);

// 托盘租赁解除绑定订单订单-详情页面
router.get('/detailRental/off/page',RentalController.offBindRentalPage);
// 托盘租赁解除绑定订单订单-列表
router.post('/detailRental/off/bindOff',RentalController.offBindRental);

// 托盘租赁订单-详情页面数据
router.post('/detailRental/data',RentalController.getRentalData);
//订单导出
router.post('/detailRental/export',RentalController.exportRentalData);
// 托盘租赁订单-详情页面租金数据数据
router.post('/detailRental/rent',RentalController.getPalletMoney);
// 托盘租赁订单-详情页面-订单废弃订单
router.post('/detailRental/cancle',RentalController.cancleOrder);
// 托盘租赁订单-详情页面-订单恢复订单
router.post('/detailRental/recover',RentalController.recoverOrder);
// 托盘租赁订单-详情页面-确认收板
router.post('/detailRental/sureOrder',RentalController.sureOrder);
// 托盘租赁订单-详情页面-修改订单
router.post('/detailRental/editSave',RentalController.editSave);
// 托盘租赁订单-详情页面-托盘金额计算
router.post('/detailRental/getCost',RentalController.getCost);

// 托盘租赁订单-详情页面-订单变更记录
router.get('/changeOrder/page',RentalController.changeOrderPage);
// 托盘租赁订单-详情页面-订单变更记录数据
router.post('/changeOrder/data',RentalController.getContinuedData);
// 托盘租赁订单-详情页面-订单变更记录-续租列表
router.post('/changeOrder/Rentallist',RentalController.Rentallist);
// 托盘租赁订单-详情页面-订单变更记录-退板列表
router.post('/changeOrder/Reternlist',RentalController.Returnlist);
// 托盘租赁订单-详情页面-订单变更记录-转租列表
router.post('/changeOrder/subletlist',RentalController.Subletlist);

// 托盘租赁订单-详情页面-合同扫描件管理
router.get('/contractManagement/page',RentalController.contractManagementPage);
// 托盘租赁订单-详情页面-合同扫描件管理-预览
router.get('/contractManagement/preview',RentalController.contractManagementPreviewPage);
// 托盘租赁订单-详情页面-合同扫描件管理
router.post('/contractManagement/list',RentalController.contractManagementList);
// 托盘租赁订单-详情页面-合同扫描件管理-上传
router.post('/contractManagement/upload',multipartMiddleware,RentalController.contractManagementUpload);
//详情页面-合同扫描件管理-删除
router.post('/contractManagement/delete',RentalController.contractManagementDelete);
// 创建托盘租赁订单-页面
router.get('/clientCreateRental/page',RentalController.clientCreateRentalPage);
//下一步创建租赁订单-页面
router.get('/clientNextRental/page',RentalController.clientNextRentalPage);
//创建订单-页面保存
router.post('/clientNextRental/save',RentalController.clientNextRentalSave);
module.exports = router;
